
import { Controller, Get, Post, Query, Body } from '@nestjs/common';
import { AppService } from './app.service';

@Controller()
export class AppController {
  constructor(private readonly appService: AppService) {}

  @Get()
  getHello(): string {
    return this.appService.getHello();
  }

  @Get('greet')
  greet(@Query('name') name: string): string {
    return this.appService.greet(name);
  }
  @Post('echo')
  echo(@Body() body: { message: string }): { message: string } {
    return this.appService.echo(body.message);
  }
  @Get('homeowners')
  getHomeOwners(): string[] {
    return this.appService.getHomeOwners();
  }

  @Get('links')
  getLinks() {
    return this.appService.getLinks();
  }

}
